<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>作用域</title>
    <script>
        let num = 12;
        function fn1(a2){
            console.log(num);
            let a = 10;
            console.log(a,a2);
        }
        // console.log(a);
        // console.log(a2);
        fn1(13);
        {
            var b=99;
            let c=22;
        }
        console.log(b);
        //console.log(c);
        let x="你好";
        {
            // let x=true;
            function fn2(){
                console.log(x);
                function fn3(){
                    console.log(1)
                }
                fn3();
            }
            fn2();
            // fn3();

        }
    


    </script>
</head>

<body>

</body>

</html>